<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>Win32::Console - Win32 Console and Character Mode Functions - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of Win32-Console - MetaCPAN" href="https://metacpan.org/dist/Win32-Console/releases.rss" />
        <link rel="canonical" href="./Win32::Console.html" />
        <meta name="description" content="Win32 Console and Character Mode Functions" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/Win32::Console" />
<meta name="twitter:title"       content="Win32::Console" />
<meta name="twitter:description" content="Win32 Console and Character Mode Functions" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="./Win32::Console.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of Win32-Console was released.">
      <span class="relatize">28 Nov 2013 21:05:38 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/Win32-Console">Win32-Console</a>
  </li>
  <li>
    Module version: 0.10
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/Win32-Console/source/Console.pm">Source</a>
    (<a href="https://metacpan.org/dist/Win32-Console/source/Console.pm?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/Win32-Console/source">Browse</a>
    (<a href="https://metacpan.org/dist/Win32-Console/source?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/Win32-Console/changes">Changes</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/Win32-Console/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/jandubois/win32-console">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://rt.cpan.org/Public/Dist/Display.html?Name=Win32-Console">Issues</a>
      (9)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=Win32-Console+0.10" title="Matrix">Testers</a>
        <span title="(pass / fail / na)">(<a rel="noopener nofollow" href="https://www.cpantesters.org/distro/W/Win32-Console.html?oncpan=1&amp;distmat=1&amp;version=0.10&amp;grade=2" style="color: #090">1</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/W/Win32-Console.html?oncpan=1&amp;distmat=1&amp;version=0.10&amp;grade=3" style="color: #900">0</a> / <a rel="noopener nofollow" href="https://www.cpantesters.org/distro/W/Win32-Console.html?oncpan=1&amp;distmat=1&amp;version=0.10&amp;grade=4">3</a>)</span>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/JDB/Win32-Console-0.10">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on Win32-Console who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 1
      </div>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpancover.com/latest/Win32-Console-0.10/index.html">% Coverage </a>
    </li>
    <li>
      License: perl_5
    </li>
    <li>
      Perl: v5.6.0
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/Win32-Console/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/J/JD/JDB/Win32-Console-0.10.tar.gz">
      Download (<span itemprop="fileSize">28.69KB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FJDB%2FWin32-Console-0.10%2FConsole.pm">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Win32-Console/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/Win32-Console/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:Win32-Console">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="Win32-Console">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/Console.pm&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  disabled
  value="JDB/Win32-Console-0.10"
>0.10
  (JDB on 2013-11-28)</option>
<optgroup label="BackPAN">'
<option
  
  value="KUERBIS/Win32-Console-PatchForRT33513"
>PatchForRT33513
  (KUERBIS on 2021-01-01)</option>
<option
  
  value="JDB/Win32-Console-0.09"
>0.09
  (JDB on 2008-06-14)</option>
<option
  
  value="JDB/Win32-Console-0.08"
>0.08
  (JDB on 2008-04-18)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/JDB/Win32-Console-0.10/diff/' + encodeURIComponent(this.value) + '/Console.pm'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  disabled
  value="JDB/Win32-Console-0.10"
>0.10
  (JDB on 2013-11-28)</option>
<optgroup label="BackPAN">'
<option
  
  value="KUERBIS/Win32-Console-PatchForRT33513"
>PatchForRT33513
  (KUERBIS on 2021-01-01)</option>
<option
  
  value="JDB/Win32-Console-0.09"
>0.09
  (JDB on 2008-06-14)</option>
<option
  
  value="JDB/Win32-Console-0.08"
>0.08
  (JDB on 2008-04-18)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><i class="ttip" title="dynamic_config enabled">unknown</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/Win32::Console/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=Win32%3A%3AConsole">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=Win32-Console">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/JDB/Win32-Console-0.10/view/Console.pm">This version</a>
    </li>
    <li>
      <a href="./Win32::Console.html">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/KUERBIS"><img src="https://www.gravatar.com/avatar/136c77354b6a6d4451c38198dd74d83c?d=identicon&amp;s=20" title="KUERBIS" alt="KUERBIS"></a>
<a class="display-all" href="https://metacpan.org/author/KEEDI"><img src="https://www.gravatar.com/avatar/95f905a7a4ccc573c711e9d264c0fde8?d=identicon&amp;s=20" title="KEEDI" alt="KEEDI"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/Win32-Console/plussers">2 PAUSE users</a>
</div>
<div>
    2 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 2 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
      data-cpan-author="ACALPINI"
      data-contrib-email="dada@perl.it"
    >
      <a href="https://metacpan.org/author/ACALPINI" class="cpan-author">
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/b6e8656226999389e5098d10e00226fe?d=identicon&amp;s=20" />
      Aldo Calpini
      </a>
    </li>
    <li class="contributor"
      data-contrib-email="jand@activestate.com"
    >
      <img class="gravatar" width="20" height="20" src="https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?d=identicon&amp;s=20" />
      Jan Dubois
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/JDB" class="author-name">Jan Dubois</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/Console.pm&#39;" class="">
<option
  selected
  value="JDB/Win32-Console-0.10"
>0.10
  (JDB on 2013-11-28)</option>
<optgroup label="BackPAN">'
<option
  
  value="KUERBIS/Win32-Console-PatchForRT33513"
>PatchForRT33513
  (KUERBIS on 2021-01-01)</option>
<option
  
  value="JDB/Win32-Console-0.09"
>0.09
  (JDB on 2008-06-14)</option>
<option
  
  value="JDB/Win32-Console-0.08"
>0.08
  (JDB on 2008-04-18)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/Win32-Console">Win32-Console-0.10</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage one &#10;
          • 4 direct dependents &#10;          • 6 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="10"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="15"  y="0" width="4" height="15" fill="#e4e2e2" />
      <rect x="20"  y="0" width="4" height="15" fill="#e4e2e2" />
    </g>
  </svg>

</span>
<div id="Win32-Console-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="Win32-Console-0.10">
    <input type="hidden" name="author" value="JDB">
    <input type="hidden" name="distribution" value="Win32-Console">
    <button type="submit" class="favorite highlight"><span>4</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="./Win32::Console.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>4</span> ++</a>
</div>
   / <span>Win32::Console</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="./Win32::Console.html#NAME">NAME</a></li>
  <li><a href="./Win32::Console.html#DESCRIPTION">DESCRIPTION</a></li>
  <li><a href="./Win32::Console.html#REFERENCE">REFERENCE</a>
    <ul>
      <li><a href="./Win32::Console.html#Methods">Methods</a></li>
      <li><a href="./Win32::Console.html#Constants">Constants</a></li>
      <li><a href="./Win32::Console.html#Microsoft&#39;s-Documentation">Microsoft&#39;s Documentation</a></li>
    </ul>
  </li>
  <li><a href="./Win32::Console.html#AUTHOR">AUTHOR</a></li>
  <li><a href="./Win32::Console.html#CREDITS">CREDITS</a></li>
  <li><a href="./Win32::Console.html#DISCLAIMER">DISCLAIMER</a></li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME</h1>

<p>Win32::Console - Win32 Console and Character Mode Functions</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>This module implements the Win32 console and character mode functions. They give you full control on the console input and output, including: support of off-screen console buffers (eg. multiple screen pages)</p>

<ul>

<li><p>reading and writing of characters, attributes and whole portions of the screen</p>

</li>
<li><p>complete processing of keyboard and mouse events</p>

</li>
<li><p>some very funny additional features :)</p>

</li>
</ul>

<p>Those functions should also make possible a port of the Unix&#39;s curses library; if there is anyone interested (and/or willing to contribute) to this project, e-mail me. Thank you.</p>

<h1 id="REFERENCE">REFERENCE</h1>

<h2 id="Methods">Methods</h2>

<dl>

<dt id="Alloc">Alloc</dt>
<dd>

<p>Allocates a new console for the process. Returns <code>undef</code> on errors, a nonzero value on success. A process cannot be associated with more than one console, so this method will fail if there is already an allocated console. Use Free to detach the process from the console, and then call Alloc to create a new console. See also: <code>Free</code></p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Alloc();</code></pre>

</dd>
<dt id="Attr-[attr]"><a id="Attr"></a><a id="Attr--attr"></a>Attr [attr]</dt>
<dd>

<p>Gets or sets the current console attribute. This attribute is used by the Write method.</p>

<p>Example:</p>

<pre><code>    $attr = $CONSOLE-&gt;Attr();
    $CONSOLE-&gt;Attr($FG_YELLOW | $BG_BLUE);</code></pre>

</dd>
<dt id="Close">Close</dt>
<dd>

<p>Closes a shortcut object. Note that it is not &quot;strictly&quot; required to close the objects you created, since the Win32::Shortcut objects are automatically closed when the program ends (or when you somehow destroy such an object).</p>

<p>Example:</p>

<pre><code>    $LINK-&gt;Close();</code></pre>

</dd>
<dt id="Cls-[attr]"><a id="Cls"></a><a id="Cls--attr"></a>Cls [attr]</dt>
<dd>

<p>Clear the console, with the specified <i>attr</i> if given, or using ATTR_NORMAL otherwise.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Cls();
    $CONSOLE-&gt;Cls($FG_WHITE | $BG_GREEN);</code></pre>

</dd>
<dt id="Cursor-[x,-y,-size,-visible]"><a id="Cursor"></a><a id="Cursor--x--y--size--visible"></a>Cursor [x, y, size, visible]</dt>
<dd>

<p>Gets or sets cursor position and appearance. Returns <code>undef</code> on errors, or a 4-element list containing: <i>x</i>, <i>y</i>, <i>size</i>, <i>visible</i>. <i>x</i> and <i>y</i> are the current cursor position; ...</p>

<p>Example:</p>

<pre><code>    ($x, $y, $size, $visible) = $CONSOLE-&gt;Cursor();

    # Get position only
    ($x, $y) = $CONSOLE-&gt;Cursor();

    $CONSOLE-&gt;Cursor(40, 13, 50, 1);

    # Set position only
    $CONSOLE-&gt;Cursor(40, 13);

    # Set size and visibility without affecting position
    $CONSOLE-&gt;Cursor(-1, -1, 50, 1);</code></pre>

</dd>
<dt id="Display">Display</dt>
<dd>

<p>Displays the specified console on the screen. Returns <code>undef</code> on errors, a nonzero value on success.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Display();</code></pre>

</dd>
<dt id="FillAttr-[attribute,-number,-col,-row]"><a id="FillAttr"></a><a id="FillAttr--attribute--number--col--row"></a>FillAttr [attribute, number, col, row]</dt>
<dd>

<p>Fills the specified number of consecutive attributes, beginning at <i>col</i>, <i>row</i>, with the value specified in <i>attribute</i>. Returns the number of attributes filled, or <code>undef</code> on errors. See also: <code>FillChar</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;FillAttr($FG_BLACK | $BG_BLACK, 80*25, 0, 0);</code></pre>

</dd>
<dt id="FillChar-char,-number,-col,-row"><a id="FillChar"></a><a id="FillChar-char--number--col--row"></a>FillChar char, number, col, row</dt>
<dd>

<p>Fills the specified number of consecutive characters, beginning at <i>col</i>, <i>row</i>, with the character specified in <i>char</i>. Returns the number of characters filled, or <code>undef</code> on errors. See also: <code>FillAttr</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;FillChar(&quot;X&quot;, 80*25, 0, 0);</code></pre>

</dd>
<dt id="Flush">Flush</dt>
<dd>

<p>Flushes the console input buffer. All the events in the buffer are discarded. Returns <code>undef</code> on errors, a nonzero value on success.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Flush();</code></pre>

</dd>
<dt id="Free">Free</dt>
<dd>

<p>Detaches the process from the console. Returns <code>undef</code> on errors, a nonzero value on success. See also: <code>Alloc</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Free();</code></pre>

</dd>
<dt id="GenerateCtrlEvent-[type,-processgroup]"><a id="GenerateCtrlEvent"></a><a id="GenerateCtrlEvent--type--processgroup"></a>GenerateCtrlEvent [type, processgroup]</dt>
<dd>

<p>Sends a break signal of the specified <i>type</i> to the specified <i>processgroup</i>. <i>type</i> can be one of the following constants:</p>

<pre><code>    CTRL_BREAK_EVENT
    CTRL_C_EVENT</code></pre>

<p>they signal, respectively, the pressing of Control + Break and of Control + C; if not specified, it defaults to CTRL_C_EVENT. <i>processgroup</i> is the pid of a process sharing the same console. If omitted, it defaults to 0 (the current process), which is also the only meaningful value that you can pass to this function. Returns <code>undef</code> on errors, a nonzero value on success.</p>

<p>Example:</p>

<pre><code>    # break this script now
    $CONSOLE-&gt;GenerateCtrlEvent();</code></pre>

</dd>
<dt id="GetEvents">GetEvents</dt>
<dd>

<p>Returns the number of unread input events in the console&#39;s input buffer, or <code>undef</code> on errors. See also: <code>Input</code>, <code>InputChar</code>, <code>PeekInput</code>, <code>WriteInput</code>.</p>

<p>Example:</p>

<pre><code>    $events = $CONSOLE-&gt;GetEvents();</code></pre>

</dd>
<dt id="Info">Info</dt>
<dd>

<p>Returns an array of informations about the console (or <code>undef</code> on errors), which contains:</p>

<ul>

<li><p>columns (X size) of the console buffer.</p>

</li>
<li><p>rows (Y size) of the console buffer.</p>

</li>
<li><p>current column (X position) of the cursor.</p>

</li>
<li><p>current row (Y position) of the cursor.</p>

</li>
<li><p>current attribute used for <code>Write</code>.</p>

</li>
<li><p>left column (X of the starting point) of the current console window.</p>

</li>
<li><p>top row (Y of the starting point) of the current console window.</p>

</li>
<li><p>right column (X of the final point) of the current console window.</p>

</li>
<li><p>bottom row (Y of the final point) of the current console window.</p>

</li>
<li><p>maximum number of columns for the console window, given the current buffer size, font and the screen size.</p>

</li>
<li><p>maximum number of rows for the console window, given the current buffer size, font and the screen size.</p>

</li>
</ul>

<p>See also: <code>Attr</code>, <code>Cursor</code>, <code>Size</code>, <code>Window</code>, <code>MaxWindow</code>.</p>

<p>Example:</p>

<pre><code>    @info = $CONSOLE-&gt;Info();
    print &quot;Cursor at $info[3], $info[4].\n&quot;;</code></pre>

</dd>
<dt id="Input">Input</dt>
<dd>

<p>Reads an event from the input buffer. Returns a list of values, which depending on the event&#39;s nature are:</p>

<dl>

<dt id="keyboard-event"><a id="keyboard"></a>keyboard event</dt>
<dd>

<p>The list will contain:</p>

<ul>

<li><p>event type: 1 for keyboard</p>

</li>
<li><p>key down: TRUE if the key is being pressed, FALSE if the key is being released</p>

</li>
<li><p>repeat count: the number of times the key is being held down</p>

</li>
<li><p>virtual keycode: the virtual key code of the key</p>

</li>
<li><p>virtual scancode: the virtual scan code of the key</p>

</li>
<li><p>char: the ASCII code of the character (if the key is a character key, 0 otherwise)</p>

</li>
<li><p>control key state: the state of the control keys (SHIFTs, CTRLs, ALTs, etc.)</p>

</li>
</ul>

</dd>
<dt id="mouse-event"><a id="mouse"></a>mouse event</dt>
<dd>

<p>The list will contain:</p>

<ul>

<li><p>event type: 2 for mouse</p>

</li>
<li><p>mouse pos. X: X coordinate (column) of the mouse location</p>

</li>
<li><p>mouse pos. Y: Y coordinate (row) of the mouse location</p>

</li>
<li><p>button state: the mouse button(s) which are pressed</p>

</li>
<li><p>control key state: the state of the control keys (SHIFTs, CTRLs, ALTs, etc.)</p>

</li>
<li><p>event flags: the type of the mouse event</p>

</li>
</ul>

</dd>
</dl>

<p>This method will return <code>undef</code> on errors. Note that the events returned are depending on the input <code>Mode</code> of the console; for example, mouse events are not intercepted unless ENABLE_MOUSE_INPUT is specified. See also: <code>GetEvents</code>, <code>InputChar</code>, <code>Mode</code>, <code>PeekInput</code>, <code>WriteInput</code>.</p>

<p>Example:</p>

<pre><code>    @event = $CONSOLE-&gt;Input();</code></pre>

</dd>
<dt id="InputChar-number"><a id="InputChar"></a>InputChar number</dt>
<dd>

<p>Reads and returns <i>number</i> characters from the console input buffer, or <code>undef</code> on errors. See also: <code>Input</code>, <code>Mode</code>.</p>

<p>Example:</p>

<pre><code>    $key = $CONSOLE-&gt;InputChar(1);</code></pre>

</dd>
<dt id="InputCP-[codepage]"><a id="InputCP"></a><a id="InputCP--codepage"></a>InputCP [codepage]</dt>
<dd>

<p>Gets or sets the input code page used by the console. Note that this doesn&#39;t apply to a console object, but to the standard input console. This attribute is used by the Write method. See also: <code>OutputCP</code>.</p>

<p>Example:</p>

<pre><code>    $codepage = $CONSOLE-&gt;InputCP();
    $CONSOLE-&gt;InputCP(437);

    # you may want to use the non-instanciated form to avoid confuzion :)
    $codepage = Win32::Console::InputCP();
    Win32::Console::InputCP(437);</code></pre>

</dd>
<dt id="MaxWindow">MaxWindow</dt>
<dd>

<p>Returns the size of the largest possible console window, based on the current font and the size of the display. The result is <code>undef</code> on errors, otherwise a 2-element list containing col, row.</p>

<p>Example:</p>

<pre><code>    ($maxCol, $maxRow) = $CONSOLE-&gt;MaxWindow();</code></pre>

</dd>
<dt id="Mode-[flags]"><a id="Mode"></a><a id="Mode--flags"></a>Mode [flags]</dt>
<dd>

<p>Gets or sets the input or output mode of a console. <i>flags</i> can be a combination of the following constants:</p>

<pre><code>    ENABLE_LINE_INPUT
    ENABLE_ECHO_INPUT
    ENABLE_PROCESSED_INPUT
    ENABLE_WINDOW_INPUT
    ENABLE_MOUSE_INPUT
    ENABLE_PROCESSED_OUTPUT
    ENABLE_WRAP_AT_EOL_OUTPUT</code></pre>

<p>For more informations on the meaning of those flags, please refer to the <a href="./Win32::Console.html#Microsoft&#39;s-Documentation">&quot;Microsoft&#39;s Documentation&quot;</a>.</p>

<p>Example:</p>

<pre><code>    $mode = $CONSOLE-&gt;Mode();
    $CONSOLE-&gt;Mode(ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT);</code></pre>

</dd>
<dt id="MouseButtons">MouseButtons</dt>
<dd>

<p>Returns the number of the buttons on your mouse, or <code>undef</code> on errors.</p>

<p>Example:</p>

<pre><code>    print &quot;Your mouse has &quot;, $CONSOLE-&gt;MouseButtons(), &quot; buttons.\n&quot;;</code></pre>

</dd>
<dt id="new-Win32::Console-standard_handle"><a id="new"></a>new Win32::Console standard_handle</dt>
<dd>

</dd>
<dt id="new-Win32::Console-[accessmode,-sharemode]"><a id="new1"></a><a id="new-Win32::Console--accessmode--sharemode"></a>new Win32::Console [accessmode, sharemode]</dt>
<dd>

<p>Creates a new console object. The first form creates a handle to a standard channel, <i>standard_handle</i> can be one of the following:</p>

<pre><code>    STD_OUTPUT_HANDLE
    STD_ERROR_HANDLE
    STD_INPUT_HANDLE</code></pre>

<p>The second form, instead, creates a console screen buffer in memory, which you can access for reading and writing as a normal console, and then redirect on the standard output (the screen) with <code>Display</code>. In this case, you can specify one or both of the following values for <i>accessmode</i>:</p>

<pre><code>    GENERIC_READ
    GENERIC_WRITE</code></pre>

<p>which are the permissions you will have on the created buffer, and one or both of the following values for <i>sharemode</i>:</p>

<pre><code>    FILE_SHARE_READ
    FILE_SHARE_WRITE</code></pre>

<p>which affect the way the console can be shared. If you don&#39;t specify any of those parameters, all 4 flags will be used.</p>

<p>Example:</p>

<pre><code>    $STDOUT = new Win32::Console(STD_OUTPUT_HANDLE);
    $STDERR = new Win32::Console(STD_ERROR_HANDLE);
    $STDIN  = new Win32::Console(STD_INPUT_HANDLE);

    $BUFFER = new Win32::Console();
    $BUFFER = new Win32::Console(GENERIC_READ | GENERIC_WRITE);</code></pre>

</dd>
<dt id="OutputCP-[codepage]"><a id="OutputCP"></a><a id="OutputCP--codepage"></a>OutputCP [codepage]</dt>
<dd>

<p>Gets or sets the output code page used by the console. Note that this doesn&#39;t apply to a console object, but to the standard output console. See also: <code>InputCP</code>.</p>

<p>Example:</p>

<pre><code>    $codepage = $CONSOLE-&gt;OutputCP();
    $CONSOLE-&gt;OutputCP(437);

    # you may want to use the non-instanciated form to avoid confuzion :)
    $codepage = Win32::Console::OutputCP();
    Win32::Console::OutputCP(437);</code></pre>

</dd>
<dt id="PeekInput">PeekInput</dt>
<dd>

<p>Does exactly the same as <code>Input</code>, except that the event read is not removed from the input buffer. See also: <code>GetEvents</code>, <code>Input</code>, <code>InputChar</code>, <code>Mode</code>, <code>WriteInput</code>.</p>

<p>Example:</p>

<pre><code>    @event = $CONSOLE-&gt;PeekInput();</code></pre>

</dd>
<dt id="ReadAttr-[number,-col,-row]"><a id="ReadAttr"></a><a id="ReadAttr--number--col--row"></a>ReadAttr [number, col, row]</dt>
<dd>

<p>Reads the specified <i>number</i> of consecutive attributes, beginning at <i>col</i>, <i>row</i>, from the console. Returns the attributes read (a variable containing one character for each attribute), or <code>undef</code> on errors. You can then pass the returned variable to <code>WriteAttr</code> to restore the saved attributes on screen. See also: <code>ReadChar</code>, <code>ReadRect</code>.</p>

<p>Example:</p>

<pre><code>    $colors = $CONSOLE-&gt;ReadAttr(80*25, 0, 0);</code></pre>

</dd>
<dt id="ReadChar-[number,-col,-row]"><a id="ReadChar"></a><a id="ReadChar--number--col--row"></a>ReadChar [number, col, row]</dt>
<dd>

<p>Reads the specified <i>number</i> of consecutive characters, beginning at <i>col</i>, <i>row</i>, from the console. Returns a string containing the characters read, or <code>undef</code> on errors. You can then pass the returned variable to <code>WriteChar</code> to restore the saved characters on screen. See also: <code>ReadAttr</code>, <code>ReadRect</code>.</p>

<p>Example:</p>

<pre><code>    $chars = $CONSOLE-&gt;ReadChar(80*25, 0, 0);</code></pre>

</dd>
<dt id="ReadRect-left,-top,-right,-bottom"><a id="ReadRect"></a><a id="ReadRect-left--top--right--bottom"></a>ReadRect left, top, right, bottom</dt>
<dd>

<p>Reads the content (characters and attributes) of the rectangle specified by <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i> from the console. Returns a string containing the rectangle read, or <code>undef</code> on errors. You can then pass the returned variable to <code>WriteRect</code> to restore the saved rectangle on screen (or on another console). See also: <code>ReadAttr</code>, <code>ReadChar</code>.</p>

<p>Example:</p>

<pre><code>     $rect = $CONSOLE-&gt;ReadRect(0, 0, 80, 25);</code></pre>

</dd>
<dt id="Scroll-left,-top,-right,-bottom,-col,-row,-char,-attr,-[cleft,-ctop,-cright,-cbottom]"><a id="Scroll"></a><a id="Scroll-left--top--right--bottom--col--row--char--attr---cleft--ctop--cright--cbottom"></a>Scroll left, top, right, bottom, col, row, char, attr, [cleft, ctop, cright, cbottom]</dt>
<dd>

<p>Moves a block of data in a console buffer; the block is identified by <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i>, while <i>row</i>, <i>col</i> identify the new location of the block. The cells left empty as a result of the move are filled with the character <i>char</i> and attribute <i>attr</i>. Optionally you can specify a clipping region with <i>cleft</i>, <i>ctop</i>, <i>cright</i>, <i>cbottom</i>, so that the content of the console outside this rectangle are unchanged. Returns <code>undef</code> on errors, a nonzero value on success.</p>

<p>Example:</p>

<pre><code>    # scrolls the screen 10 lines down, filling with black spaces
    $CONSOLE-&gt;Scroll(0, 0, 80, 25, 0, 10, &quot; &quot;, $FG_BLACK | $BG_BLACK);</code></pre>

</dd>
<dt id="Select-standard_handle"><a id="Select"></a>Select standard_handle</dt>
<dd>

<p>Redirects a standard handle to the specified console. <i>standard_handle</i> can have one of the following values:</p>

<pre><code>    STD_INPUT_HANDLE
    STD_OUTPUT_HANDLE
    STD_ERROR_HANDLE</code></pre>

<p>Returns <code>undef</code> on errors, a nonzero value on success.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Select(STD_OUTPUT_HANDLE);</code></pre>

</dd>
<dt id="SetIcon-icon_file"><a id="SetIcon"></a>SetIcon icon_file</dt>
<dd>

<p>Sets the icon in the title bar of the current console window.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;SetIcon(&quot;C:/My/Path/To/Custom.ico&quot;);</code></pre>

</dd>
<dt id="Size-[col,-row]"><a id="Size"></a><a id="Size--col--row"></a>Size [col, row]</dt>
<dd>

<p>Gets or sets the console buffer size.</p>

<p>Example:</p>

<pre><code>    ($x, $y) = $CONSOLE-&gt;Size();
    $CONSOLE-&gt;Size(80, 25);</code></pre>

</dd>
<dt id="Title-[title]"><a id="Title"></a><a id="Title--title"></a>Title [title]</dt>
<dd>

<p>Gets or sets the title of the current console window.</p>

<p>Example:</p>

<pre><code>    $title = $CONSOLE-&gt;Title();
    $CONSOLE-&gt;Title(&quot;This is a title&quot;);</code></pre>

</dd>
<dt id="Window-[flag,-left,-top,-right,-bottom]"><a id="Window"></a><a id="Window--flag--left--top--right--bottom"></a>Window [flag, left, top, right, bottom]</dt>
<dd>

<p>Gets or sets the current console window size. If called without arguments, returns a 4-element list containing the current window coordinates in the form of <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i>. To set the window size, you have to specify an additional <i>flag</i> parameter: if it is 0 (zero), coordinates are considered relative to the current coordinates; if it is non-zero, coordinates are absolute.</p>

<p>Example:</p>

<pre><code>    ($left, $top, $right, $bottom) = $CONSOLE-&gt;Window();
    $CONSOLE-&gt;Window(1, 0, 0, 80, 50);</code></pre>

</dd>
<dt id="Write-string"><a id="Write"></a>Write string</dt>
<dd>

<p>Writes <i>string</i> on the console, using the current attribute, that you can set with <code>Attr</code>, and advancing the cursor as needed. This isn&#39;t so different from Perl&#39;s &quot;print&quot; statement. Returns the number of characters written or <code>undef</code> on errors. See also: <code>WriteAttr</code>, <code>WriteChar</code>, <code>WriteRect</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;Write(&quot;Hello, world!&quot;);</code></pre>

</dd>
<dt id="WriteAttr-attrs,-col,-row"><a id="WriteAttr"></a><a id="WriteAttr-attrs--col--row"></a>WriteAttr attrs, col, row</dt>
<dd>

<p>Writes the attributes in the string <i>attrs</i>, beginning at <i>col</i>, <i>row</i>, without affecting the characters that are on screen. The string attrs can be the result of a <code>ReadAttr</code> function, or you can build your own attribute string; in this case, keep in mind that every attribute is treated as a character, not a number (see example). Returns the number of attributes written or <code>undef</code> on errors. See also: <code>Write</code>, <code>WriteChar</code>, <code>WriteRect</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;WriteAttr($attrs, 0, 0);

    # note the use of chr()...
    $attrs = chr($FG_BLACK | $BG_WHITE) x 80;
    $CONSOLE-&gt;WriteAttr($attrs, 0, 0);</code></pre>

</dd>
<dt id="WriteChar-chars,-col,-row"><a id="WriteChar"></a><a id="WriteChar-chars--col--row"></a>WriteChar chars, col, row</dt>
<dd>

<p>Writes the characters in the string <i>attr</i>, beginning at <i>col</i>, <i>row</i>, without affecting the attributes that are on screen. The string <i>chars</i> can be the result of a <code>ReadChar</code> function, or a normal string. Returns the number of characters written or <code>undef</code> on errors. See also: <code>Write</code>, <code>WriteAttr</code>, <code>WriteRect</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;WriteChar(&quot;Hello, worlds!&quot;, 0, 0);</code></pre>

</dd>
<dt id="WriteInput-(event)"><a id="WriteInput"></a><a id="WriteInput--event"></a>WriteInput (event)</dt>
<dd>

<p>Pushes data in the console input buffer. <i>(event)</i> is a list of values, for more information see <code>Input</code>. The string chars can be the result of a <code>ReadChar</code> function, or a normal string. Returns the number of characters written or <code>undef</code> on errors. See also: <code>Write</code>, <code>WriteAttr</code>, <code>WriteRect</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;WriteInput(@event);</code></pre>

</dd>
<dt id="WriteRect-rect,-left,-top,-right,-bottom"><a id="WriteRect"></a><a id="WriteRect-rect--left--top--right--bottom"></a>WriteRect rect, left, top, right, bottom</dt>
<dd>

<p>Writes a rectangle of characters and attributes (contained in <i>rect</i>) on the console at the coordinates specified by <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i>. <i>rect</i> can be the result of a <code>ReadRect</code> function. Returns <code>undef</code> on errors, otherwise a 4-element list containing the coordinates of the affected rectangle, in the format <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i>. See also: <code>Write</code>, <code>WriteAttr</code>, <code>WriteChar</code>.</p>

<p>Example:</p>

<pre><code>    $CONSOLE-&gt;WriteRect($rect, 0, 0, 80, 25);</code></pre>

</dd>
</dl>

<h2 id="Constants">Constants</h2>

<p>The following constants are exported in the main namespace of your script using Win32::Console:</p>

<pre><code>    BACKGROUND_BLUE
    BACKGROUND_GREEN
    BACKGROUND_INTENSITY
    BACKGROUND_RED
    CAPSLOCK_ON
    CONSOLE_TEXTMODE_BUFFER
    ENABLE_ECHO_INPUT
    ENABLE_LINE_INPUT
    ENABLE_MOUSE_INPUT
    ENABLE_PROCESSED_INPUT
    ENABLE_PROCESSED_OUTPUT
    ENABLE_WINDOW_INPUT
    ENABLE_WRAP_AT_EOL_OUTPUT
    ENHANCED_KEY
    FILE_SHARE_READ
    FILE_SHARE_WRITE
    FOREGROUND_BLUE
    FOREGROUND_GREEN
    FOREGROUND_INTENSITY
    FOREGROUND_RED
    LEFT_ALT_PRESSED
    LEFT_CTRL_PRESSED
    NUMLOCK_ON
    GENERIC_READ
    GENERIC_WRITE
    RIGHT_ALT_PRESSED
    RIGHT_CTRL_PRESSED
    SCROLLLOCK_ON
    SHIFT_PRESSED
    STD_INPUT_HANDLE
    STD_OUTPUT_HANDLE
    STD_ERROR_HANDLE</code></pre>

<p>Additionally, the following variables can be used:</p>

<pre><code>    $FG_BLACK
    $FG_GRAY
    $FG_BLUE
    $FG_LIGHTBLUE
    $FG_RED
    $FG_LIGHTRED
    $FG_GREEN
    $FG_LIGHTGREEN
    $FG_MAGENTA
    $FG_LIGHTMAGENTA
    $FG_CYAN
    $FG_LIGHTCYAN
    $FG_BROWN
    $FG_YELLOW
    $FG_LIGHTGRAY
    $FG_WHITE

    $BG_BLACK
    $BG_GRAY
    $BG_BLUE
    $BG_LIGHTBLUE
    $BG_RED
    $BG_LIGHTRED
    $BG_GREEN
    $BG_LIGHTGREEN
    $BG_MAGENTA
    $BG_LIGHTMAGENTA
    $BG_CYAN
    $BG_LIGHTCYAN
    $BG_BROWN
    $BG_YELLOW
    $BG_LIGHTGRAY
    $BG_WHITE

    $ATTR_NORMAL
    $ATTR_INVERSE</code></pre>

<p>ATTR_NORMAL is set to gray foreground on black background (DOS&#39;s standard colors).</p>

<h2 id="Microsoft&#39;s-Documentation"><a id="Microsoft"></a><a id="Microsoft-s-Documentation"></a>Microsoft&#39;s Documentation</h2>

<p>Documentation for the Win32 Console and Character mode Functions can be found on Microsoft&#39;s site at this URL:</p>

<p>http://www.microsoft.com/msdn/sdk/platforms/doc/sdk/win32/sys/src/conchar.htm</p>

<p>A reference of the available functions is at:</p>

<p>http://www.microsoft.com/msdn/sdk/platforms/doc/sdk/win32/sys/src/conchar_34.htm</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Aldo Calpini &lt;a.calpini@romagiubileo.it&gt;</p>

<h1 id="CREDITS">CREDITS</h1>

<p>Thanks to: Jesse Dougherty, Dave Roth, ActiveWare, and the Perl-Win32-Users community.</p>

<h1 id="DISCLAIMER">DISCLAIMER</h1>

<p>This program is FREE; you can redistribute, modify, disassemble, or even reverse engineer this software at your will. Keep in mind, however, that NOTHING IS GUARANTEED to work and everything you do is AT YOUR OWN RISK - I will not take responsibility for any damage, loss of money and/or health that may arise from the use of this program!</p>

<p>This is distributed under the terms of Larry Wall&#39;s Artistic License.</p></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install Win32::Console, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm Win32::Console</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install Win32::Console</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="./Win32::Console.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
